package org.hpin.asset.service;

import org.hpin.asset.dao.AssetDao;
import org.hpin.asset.entity.Assetinfo;
import org.hpin.common.core.orm.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service(value = "org.hpin.asset.service.AssetService")
@Transactional(rollbackFor = Exception.class)
public class AssetService extends BaseService{
	@Autowired
	private AssetDao dao;

	public void delete(String [] ids){
		for(int i=0;i< ids.length;i++){
			Assetinfo assetinfo = (Assetinfo) dao.findById(Assetinfo.class,ids[i]);
			assetinfo.setIsDeleted(1);
			dao.update(assetinfo);
		}
	}
}